package org.mat.ipaas.ucenter.bff.admin.modules.message.controller;

import com.alibaba.fastjson.JSONObject;
import org.mat.framework.lang.dto.MatApiResponse;
import org.mat.ipaas.ucenter.service.api.message.TestSocketRestAPI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TestSocketController
 */
@RestController
@RequestMapping("/sys/socketTest")
public class TestSocketController {

    @Autowired
    private TestSocketRestAPI testSocketRestAPI;

    @PostMapping("/sendAll")
    public MatApiResponse<String> sendAll(@RequestBody JSONObject jsonObject) {
		MatApiResponse<String> matApiResponse = testSocketRestAPI.sendAll(jsonObject);
		return matApiResponse;
    }

    @PostMapping("/sendUser")
    public MatApiResponse<String> sendUser(@RequestBody JSONObject jsonObject) {
		MatApiResponse<String> matApiResponse = testSocketRestAPI.sendUser(jsonObject);
		return matApiResponse;
    }

}